package com.ruoyi.yyq.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yyq.mapper.CarMerchantActivitiesMapper;
import com.ruoyi.yyq.domain.CarMerchantActivities;
import com.ruoyi.yyq.service.ICarMerchantActivitiesService;

/**
 * 商家活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class CarMerchantActivitiesServiceImpl implements ICarMerchantActivitiesService 
{
    @Autowired
    private CarMerchantActivitiesMapper carMerchantActivitiesMapper;

    /**
     * 查询商家活动
     * 
     * @param id 商家活动主键
     * @return 商家活动
     */
    @Override
    public CarMerchantActivities selectCarMerchantActivitiesById(Long id)
    {
        return carMerchantActivitiesMapper.selectCarMerchantActivitiesById(id);
    }

    /**
     * 查询商家活动列表
     * 
     * @param carMerchantActivities 商家活动
     * @return 商家活动
     */
    @Override
    public List<CarMerchantActivities> selectCarMerchantActivitiesList(CarMerchantActivities carMerchantActivities)
    {
        return carMerchantActivitiesMapper.selectCarMerchantActivitiesList(carMerchantActivities);
    }

    /**
     * 新增商家活动
     * 
     * @param carMerchantActivities 商家活动
     * @return 结果
     */
    @Override
    public int insertCarMerchantActivities(CarMerchantActivities carMerchantActivities)
    {
        return carMerchantActivitiesMapper.insertCarMerchantActivities(carMerchantActivities);
    }

    /**
     * 修改商家活动
     * 
     * @param carMerchantActivities 商家活动
     * @return 结果
     */
    @Override
    public int updateCarMerchantActivities(CarMerchantActivities carMerchantActivities)
    {
        return carMerchantActivitiesMapper.updateCarMerchantActivities(carMerchantActivities);
    }

    /**
     * 批量删除商家活动
     * 
     * @param ids 需要删除的商家活动主键
     * @return 结果
     */
    @Override
    public int deleteCarMerchantActivitiesByIds(Long[] ids)
    {
        return carMerchantActivitiesMapper.deleteCarMerchantActivitiesByIds(ids);
    }

    /**
     * 删除商家活动信息
     * 
     * @param id 商家活动主键
     * @return 结果
     */
    @Override
    public int deleteCarMerchantActivitiesById(Long id)
    {
        return carMerchantActivitiesMapper.deleteCarMerchantActivitiesById(id);
    }
}
